home *** CD-ROM | disk | FTP | other *** search
- property s, getgoingtime, myloc, mystartloc, mypercent, mywidth, myheight
- global tickrate, stagedone, talkaboutbronze
-
- on beginSprite me
- s = me.spriteNum
- mywidth = the width of sprite s
- myheight = the height of sprite s
- myloc = the loc of sprite s
- mystartloc = point(random(800), random(600))
- set the width of sprite s to 10
- set the height of sprite s to 10
- set the loc of sprite s to mystartloc
- mypercent = random(200) * -1
- getgoingtime = random(180)
- end
-
- on prepareFrame me
- if getgoingtime < the ticks then
- if the loc of sprite s = myloc then
- set the width of sprite s to float(mywidth) / 100 * (mypercent - 100)
- set the height of sprite s to float(myheight) / 100 * (mypercent - 100)
- mypercent = min(200, mypercent + tickrate)
- else
- if mypercent = 100 then
- set the loc of sprite s to myloc
- else
- if talkaboutbronze then
- if mypercent > 50 then
- set the locH of sprite s to the mouseH + (float(myloc.locH - the mouseH) / 100 * mypercent)
- set the locV of sprite s to the mouseV + (float(myloc.locV - the mouseV) / 100 * mypercent)
- else
- set the locH of sprite s to mystartloc.locH + (float(the mouseH - mystartloc.locH) / 100 * mypercent)
- set the locV of sprite s to mystartloc.locV + (float(the mouseV - mystartloc.locV) / 100 * mypercent)
- end if
- else
- set the locH of sprite s to mystartloc.locH + (float(myloc.locH - mystartloc.locH) / 100 * mypercent)
- set the locV of sprite s to mystartloc.locV + (float(myloc.locV - mystartloc.locV) / 100 * mypercent)
- end if
- mypercent = min(100, mypercent + tickrate)
- end if
- end if
- end if
- end
-
- on donestage me
- if mypercent < 200 then
- stagedone = 0
- end if
- end
-